<extend name="Public/base"/>
<block name="content">
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">商家划转记录</strong>  <small></small></div>
            </div>

            <hr>

            <form class="am-g" action="{:U('')}" method="get">

                <div class="am-u-sm-12 am-u-md-2">
                    <input type="text" class="am-form-field" name="start_time"  value="{$param.start_time}" placeholder="开始时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',readOnly:true})" readonly/>
                </div>
                <div class="am-u-sm-12 am-u-md-2">
                    <input type="text" class="am-form-field" name="end_time"  value="{$param.end_time}" placeholder="结束时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',readOnly:true})" readonly/>
                </div>


                <div class="am-u-sm-12 am-u-md-2">
                    <div class="am-form-group">
                        <select name="reward_type" id="" class="am-form-field">
                            <option value="" <if condition="$param.reward_type eq ''">selected</if>>全部</option>
                            <option value="12" <if condition="$param.reward_type eq '12'">selected</if>>开启记录</option>
                            <option value="123" <if condition="$param.reward_type eq '123'">selected</if>>关闭记录</option>
                        </select>
                    </div>
                </div>
                <div class="am-u-sm-12 am-u-md-2">
                    <div class="am-input-group am-input-group-sm">
                        <input type="text" class="am-form-field" name="username" placeholder="用户名精确查找" value="{$param.username}">
                    </div>
                </div>

                <div class="am-u-sm-12 am-u-md-2">
                    <div class="am-input-group am-input-group-sm">
                        <input class="am-btn am-btn-primary" value="搜索" type="submit" id="search"/>

                        <input class="am-btn am-btn-primary" value="导出" type="submit" id="export" style="    margin-left: 5px"/>
                        <!--</span>-->
                    </div>
                </div>

                <div class="am-u-sm-12 am-u-md-2">
                </div>


            </form>

            <div class="am-g">
                <div class="am-u-sm-12">
                    <div class="am-form">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th class="table-title">用户名</th>
                                <th class="table-title">金额</th>
                                <th class="table-date am-hide-sm-only">备注</th>
                                <th class="table-date am-hide-sm-only">时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="data" id="vo">
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo['username']}</td>
                                    <td>{$vo['amount']}</td>
                                    <td class="am-hide-sm-only">{$vo['tips']}</td>
                                    <td>{$vo['create_time']|date="Y-m-d H:i:s",###}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        <div class="am-cf">
                            共 {$count} 条记录
                            <div class="am-fr">
                                <ul class="am-pagination">
                                    {$show}
                                </ul>
                            </div>
                        </div>
                        <hr />
                    </>
                </div>

            </div>
        </div>
    </div>

</block>

<block name="js">
    <script>
        var exporturl = "{:U('exportLockRecord')}";
        $('#export').click(function () {
            $('form').attr('action',exporturl);
        });
        var search = "{:U('lock_record')}";
        $('#search').click(function () {
            $('form').attr('action',search);
        });
    </script>
</block>